import request from '../utils/request';
//商户登录
export const login = query => {
    return request({
        url: '/vehicle/business/login',
        method: 'get',
        params: query
    });
};
//商户注册
export const register = query => {
    return request({
        url: '/vehicle/business/register',
        method: 'post',
        params: query
    });
};
//订单测试
export const businessList = query => {
    return request({
        url: '/vehicle/order/_',
        method: 'get',
        params: query
    })
}
//详情
export const getBusinessById = query => {
    return request({
        url: '/vehicle/business/getBusinessById',
        method: 'get',
        params: query
    })
}

//扫描核销码

export const scanVerification = query => {
    return request({
        url: '/vehicle/order/scanVerification',
        method: 'post',
        params:query
    });
};
//经营统计
export const statistics = query => {
    return request({
        url: '/vehicle/order/oneDayOrder',
        method: 'get',
        params:query
    });
};
//商家添加优惠劵
export const addBusinessDiscounts = query => {
    return request({
        url: '/vehicle/discounts/addBusinessDiscounts',
        method: 'post',
        params: query
    });
};
// 查询我的车辆
export const myCar = query => {
    return request({
        url: '/vehicle/cars/myCar',
        method: 'get',
        params: query
    });
}
//订单查询、核销记录
export const order = query => {
    return request({
        url: '/vehicle/order/_',
        method: 'get',
        params:query
    });
};
//  获取商家优惠劵
export const queryDiscounts = query => {
    return request({
        url: '/vehicle/discounts/queryDiscounts',
        method: 'get',
        params: query
    });
};
//  活动发布信息
export const informationAll = query => {
    return request({
        url: '/vehicle/information/all',
        method: 'get',
        params: query
    });
};
//  查询信息
export const informationQueryBy = query => {
    return request({
        url: '/vehicle/information/queryBy',
        method: 'get',
        params: query
    });
};
//  维修订单
export const maintainOrder = query => {
    return request({
        url: '/vehicle/order/_',
        method: 'get',
        params: query
    });
};
//  活动上下架
export const upAndDown = query => {
    return request({
        url: '/vehicle/information/upAndDown',
        method: 'get',
        params: query
    });
};
//评价列表
export const evaluation = () => {
    return request({
        url: '/vehicle/order/comment',
        method: 'get',
    })
}
//订单详情
export const orderDetail = query => {
    return request({
        url: '/vehicle/order/_'+query,
        method: 'get'
    })
} 


//  活动发布
export const informationIssue = () => {
    return request({
        url: '/vehicle/information/issue',
        method: 'post',
        // params: query
    });

}; 
//车辆测试--2
export const selectCars = query => {
    return request({
        url: '/vehicle/cars/myCar',
        method: 'get',
        params: query
    })
}

//修改信息
export const updateInfo = query => {
    return request({
        url: '/vehicle/business/update',
        method: 'post',
        params: query
    });
};
//服务内容
export const categories = query => {
    return request({
        // url: '/vehicle/categories/all',
        url: '/vehicle/services/all',
        method: 'get',
        params: query
    })
}











